//---- Set this variable only! ----
var buildDir = "/PARCELATORIAL/View/js/menu/";
//---------------------------------

var blank;
var source;
var version;

var ie4 = false;
var nn4 = false;
var dom = false;
var ie55 = false;
var opera = false;
var safari = false;
var ie5_mac = false;

var agent = navigator.userAgent.toLowerCase();

if (agent.indexOf("opera") != -1) {
   opera = true;
}
else if (agent.indexOf("safari") != -1) {
   safari = true;
}
else if (document.all) {
   version = parseFloat(agent.substr(agent.indexOf("msie")+5, 3));
   if (agent.indexOf("mac") != -1 && version >= 5) {
      ie5_mac = true;
   }
   else {
      if (version >= 5.5) {
         ie55 = true;
      }
      else if (version >= 4) {
         ie4 = true;
      };
   };
}
else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4 && 	parseInt(navigator.appVersion) < 5) {
   nn4 = true;
}
else if (document.getElementById) {
   dom = true;
};

blank = new Image();
blank.src = buildDir + "blank.gif";

if (ie4) {
   source = "ie4-build.js";
}
else if (ie5_mac) {
   source = "ie5m-build.js";
}
else if (ie55) {
   source = "ie55-build.js";
}
else if (nn4) {
   source = "ns4-build.js";
}
else if (dom) {
   source = "dom-build.js";
}
else if (opera) {
   source = "op7-build.js";
}
else if (safari) {
   source = "saf-build.js";
}
else {
   source = "no-build.js";
   location.href = buildDir + "upgrade.html";
};
document.write('<script type="text/javascript" src="' + buildDir + source + '"></script>');